package pt.mauromad.guias.dao.manifest;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import pt.mauromad.guias.dao.generic.GenericAddressDao;

@Entity
@Table(name = "manifest_address")
public class ManifestAddressDao extends GenericAddressDao {
	private ManifestDao manifest;

	@ManyToOne(fetch = FetchType.LAZY, optional = false, cascade = CascadeType.DETACH)
	@JoinColumn(name = "manifest_id", insertable = true, updatable = false, nullable = false)
	public ManifestDao getManifest() {
		return manifest;
	}

	public void setManifest(ManifestDao manifest) {
		this.manifest = manifest;
	}
}
